#include "bigint.h"

// Constructor that handles base case
BigInt::BigInt()
{
    mainNum[0] = 0;
}

// Constructor that handles BigInt from string
BigInt::BigInt(string input)
{
    for (unsigned int i = 0; i < input.length(); ++i)
    {
        mainNum.push_back(int(input[i]));
    }
}

// Constructor that handles BigInt from int
BigInt::BigInt(int input)
{
    char buffer [50];
    itoa(input, buffer, 49);
    int i = 0;
    while (buffer[i] != '\0')
    {
        mainNum.push_back(int(buffer[i]));
    }
}

// Adds two BigInts together
void BigInt::addTo(BigInt b)
{
    int largerLength;
    if (this->mainNum.size() > b.mainNum.size())
    {
        largerLength = this->mainNum.size();
    }
    else
    {
        largerLength = b.mainNum.size();
    }
    for (int i = 0; i < largerLength; ++i)
    {
        // copy over
    }
}
